package com.sec.etech.common;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface LifeCycle {

    boolean checkPermission(HttpServletRequest request, HttpServletResponse response, JSONObject data) throws Exception;

    void beforeSave(HttpServletRequest request, HttpServletResponse response, JSONObject data);

    void afterSave(HttpServletRequest request, HttpServletResponse response, JSONObject data) throws IOException, ClassNotFoundException, Exception;

    String permissionDenied();

}
